package com.shopx.sys.dao.db1;

import com.shopx.sys.bean.SysCompany;
import com.shopx.sys.dto.CpTreeDTO;
import com.shopx.sys.model.SysCompanyModel;
import com.shopx.dal.mysql.SqlMapper;

import java.math.BigDecimal;
import java.util.List;

/**
 * TODO
 *
 * @author lituo
 * @className: SysCompany
 * @date 2021-12-07
 */
@SqlMapper
public interface SysCompanyDao {
  /**
   * 查询明细记录
   *
   * @param sysCompany
   * @return SysCompanyModel
   * @author lituo
   * @date 2021-12-07
   */
  SysCompanyModel selectByPrimaryKey(SysCompany sysCompany);

  /**
   * 新增记录
   *
   * @param sysCompany
   * @return int
   * @author lituo
   * @date 2021-12-07
   */
  int insertSelective(SysCompany sysCompany);

  /**
   * 修改记录
   *
   * @param sysCompany
   * @return int
   * @author lituo
   * @date 2021-12-07
   */
  int updateByPrimaryKeySelective(SysCompany sysCompany);

  /**
   * 删除记录
   *
   * @param sysCompany
   * @return int
   * @author lituo
   * @date 2021-12-07
   */
  int deleteByPrimaryKey(SysCompany sysCompany);

  /**
   * 查询总记录数
   *
   * @param sysCompany
   * @return int
   * @author lituo
   * @date 2021-12-07
   */
  int selectCount(SysCompanyModel sysCompany);

  /**
   * 查询列表
   *
   * @param sysCompany
   * @return List<SysCompanyModel>
   * @author lituo
   * @date 2021-12-07
   */
  List<SysCompanyModel> selectList(SysCompanyModel sysCompany);

  /**
    * 查询公司余额
    * @author lituo
    * @date 11:01 AM 2022/1/2
    * @param	cpId
    * @return java.math.BigDecimal
    */
  Long selectCompanyBalance(String cpId);

  /**
   * @descript 修改企业余额
   *
   * @param sysCompany
   * @author lituo
   * @date 2022/3/1 14:43
   * @return int
   */
  int updateCompanyBalance(SysCompany sysCompany);

  /**
   * 查询公司树菜单
   * @param sysCompany
   * @return
   */
  List<CpTreeDTO> selectCpTree();
}

